[SPARK-3010] fix redundant conditional#1992
Conversation
|
Can one of the admins verify this patch? |
There was a problem hiding this comment.
If you really want to trim redundancy, the parens are now unnecessary -- as are the braces and the 'x'. So, you could pare this all the way down to:
val prunedRDD2 = PartitionPruningRDD.create(rdd, _ == 2)|
Something seems to be amiss in this PR: Several of your changes are neither in And some of your changes don't really go all the way toward cleaning up the logic. For example, (aclsEnabled() && (user != null) && (!viewAcls.contains(user))) == falsewould be better as !aclsEnabled || user == null || viewAcls.contains(user) |
|
@markhamstra, thanks for comments. I have merged SecurityManager right now and updated with your comments. |
|
Jenkins, test this please |
|
Looks good to me pending tests |
|
QA tests have started for PR 1992 at commit
|
|
QA tests have finished for PR 1992 at commit
|
|
Jenkins, test this please |
|
QA tests have started for PR 1992 at commit
|
|
QA tests have finished for PR 1992 at commit
|
|
@mateiz retest this again, tests failed in sparkstreaming, thanks. |
|
Jenkins, test this please. |
|
hi @pwendell, jenkins fetch error. |
|
Jenkins, retest this please. |
|
QA tests have started for PR 1992 at commit
|
|
QA tests have finished for PR 1992 at commit
|
|
Merged this, thanks! |
https://issues.apache.org/jira/browse/SPARK-3010 this pr is to fix redundant conditional in spark, such as 1. private[spark] def codegenEnabled: Boolean = if (getConf(CODEGEN_ENABLED, "false") == "true") true else false 2. x => if (x == 2) true else false ... Author: scwf <wangfei1@huawei.com> Author: wangfei <wangfei_hello@126.com> Closes apache#1992 from scwf/condition and squashes the following commits: b2a044a [scwf] merge SecurityManager e16239c [scwf] fix confilct 6811401 [scwf] fix merge confilct 0824df4 [scwf] Merge branch 'master' of https://github.com/apache/spark into patch-4 e274515 [scwf] fix redundant conditions d032bf9 [wangfei] [SQL]Excess judgment
https://issues.apache.org/jira/browse/SPARK-3010
this pr is to fix redundant conditional in spark, such as
1.
private[spark] def codegenEnabled: Boolean =
if (getConf(CODEGEN_ENABLED, "false") == "true") true else false
2.
x => if (x == 2) true else false
...